<template>
	<div class="trading" id="trading">
		<!--
	    	作者：846966684@qq.com
	    	时间：2017-02-21
	    	描述：通用头部
	    	通过参数，可以控制不同的状态
	    -->
		<ion-header>
		</ion-header>
		<!--
	    	作者：846966684@qq.com
	    	时间：2017-02-21
	    	描述：通用全局容器--全屏容器
	    -->
		<ion-content class="content">
			<ion-content12>
				<div class="trading_title">
					<div class="container">
						<a href="/" class="hone">首页 &gt; </a>
						<a href="#/trading/btc/trade" class="deal">快速交易 &gt; </a>
						<a class="active" href="#/trading/btc/trade">BTC/CNY现货</a>
					</div>
				</div>
				<div class="content_left">

					<div class="main">
						<sidebar :menus="computedMenus">
						</sidebar>
					</div>

				</div>

				<div class="content_right">
					<router-view></router-view>
				</div>
			</ion-content12>
		</ion-content>
		<!--
    	作者：846966684@qq.com
    	时间：2017-02-21
    	描述：通用footer
    -->
		<ion-footer>
		</ion-footer>

	</div>
</template>

<script>
	import sidebar from './pannel/sidebar';

	const menus = {
		title: 'CNY交易区',
		subMenu: [{
			title: 'BTC/CNY交易',
			index: 'ac-0',
			links: [{
				url: '/trading/btc/trade',
				title: '买卖交易',
				type: 'trade'
			}, {
				url: '/trading/btc/market',
				title: '行情信息',
				type: 'market'
			}, {
				url: '/trading/btc/consignation',
				title: '委托管理',
				type: 'consignation'
			}, ],
		}, {
			title: 'ZEC/CNY交易',
			index: 'ac-1',
			links: [{
				url: '/trading/zec/trade',
				title: '买卖交易',
				type: 'trade'
			}, {
				url: '/trading/zec/market',
				title: '行情信息',
				type: 'market'
			}, {
				url: '/trading/zec/consignation',
				title: '委托管理',
				type: 'consignation'
			}, ],
		}, {
			title: 'ETC/CNY交易',
			index: 'ac-2',
			links: [{
				url: '/trading/etc/trade',
				title: '买卖交易',
				type: 'trade'
			}, {
				url: '/trading/etc/market',
				title: '行情信息',
				type: 'market'
			}, {
				url: '/trading/etc/consignation',
				title: '委托管理',
				type: 'consignation'
			}, ],
		}, {
			title: 'ETH/CNY交易',
			index: 'ac-3',
			links: [{
				url: '/trading/eth/trade',
				title: '买卖交易',
				type: 'trade'
			}, {
				url: '/trading/eth/market',
				title: '行情信息',
				type: 'market'
			}, {
				url: '/trading/eth/consignation',
				title: '委托管理',
				type: 'consignation'
			}, ],
		}, ],
	};

	export default {
		name: 'trading',
		computed: {
			computedMenus() {
				return menus;
			},
		},
		data() {
			return {
				title: '',
			}
		}, //定义变量
		components: {
			sidebar,
		}, //注册组件
		methods: { //方法都在这里
		},
		mounted() {
			var that = this;
			//获取banner
		},
	}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss">
	.trading {
		.content {
			margin-bottom: 80px;
		}
		.content_left {
			float: left;
			.main {
				border: 2px solid #ededed;
				float: left;
				text-align: center;
				width: 200px;
				height: 620px;
			}
		}
		.content_right {
			margin-left: 240px;
		}
		.trading_title {
				text-align: left;
				font-size: 14px;
				padding: 30px 0px;
				a {
					color: #9b9b9b;
				}
				.active {
					color: #0093f1;
				}
			}
	}
</style>